home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / mcadangl.zip / RADTODMS.MCD next >
Text File  |  1994-11-29  |  11KB  |  338 lines

  1. .MCAD 303010000 1 0 56 0
  2. .CMD FORMAT  rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge temperature tr=0 vm=-2063149856
  3. .CMD SET ORIGIN 0
  4. .CMD SET TOL 0.001000000000000
  5. .CMD SET PRNCOLWIDTH 8
  6. .CMD SET PRNPRECISION 4
  7. .CMD PRINT_SETUP 1.200000 0.000000 0.000000 0.000000 0
  8. .CMD HEADER_FOOTER 1 1 *empty* *empty* *empty* 0 1 *empty* *empty* *empty*
  9. .CMD HEADER_FOOTER_FONT fontID=14 family=Arial points=10 bold=0 italic=0 underline=0
  10. .CMD HEADER_FOOTER_FONT fontID=15 family=Arial points=10 bold=0 italic=0 underline=0
  11. .CMD DEFINE_FONTSTYLE_NAME fontID=0 name=Variables
  12. .CMD DEFINE_FONTSTYLE_NAME fontID=1 name=Constants
  13. .CMD DEFINE_FONTSTYLE_NAME fontID=2 name=Text
  14. .CMD DEFINE_FONTSTYLE_NAME fontID=4 name=User^1
  15. .CMD DEFINE_FONTSTYLE_NAME fontID=5 name=User^2
  16. .CMD DEFINE_FONTSTYLE_NAME fontID=6 name=User^3
  17. .CMD DEFINE_FONTSTYLE_NAME fontID=7 name=User^4
  18. .CMD DEFINE_FONTSTYLE_NAME fontID=8 name=User^5
  19. .CMD DEFINE_FONTSTYLE_NAME fontID=9 name=User^6
  20. .CMD DEFINE_FONTSTYLE_NAME fontID=10 name=User^7
  21. .CMD DEFINE_FONTSTYLE fontID=0 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
  22. .CMD DEFINE_FONTSTYLE fontID=1 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
  23. .CMD DEFINE_FONTSTYLE fontID=2 family=Arial points=10 bold=0 italic=0 underline=0
  24. .CMD DEFINE_FONTSTYLE fontID=4 family=Arial points=10 bold=0 italic=0 underline=0
  25. .CMD DEFINE_FONTSTYLE fontID=5 family=Courier^New points=10 bold=0 italic=0 underline=0
  26. .CMD DEFINE_FONTSTYLE fontID=6 family=System points=10 bold=0 italic=0 underline=0
  27. .CMD DEFINE_FONTSTYLE fontID=7 family=Script points=10 bold=0 italic=0 underline=0
  28. .CMD DEFINE_FONTSTYLE fontID=8 family=Roman points=10 bold=0 italic=0 underline=0
  29. .CMD DEFINE_FONTSTYLE fontID=9 family=Modern points=10 bold=0 italic=0 underline=0
  30. .CMD DEFINE_FONTSTYLE fontID=10 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
  31. .CMD UNITS U=1
  32. .CMD DIMENSIONS_ANALYSIS 0 0
  33. .TXT 3 3 1 0
  34. Cg a48.250000,71.000000,50
  35. {\rtf1\ansi \deff0
  36. {\fonttbl
  37. {\f0\fnil Arial;}
  38. }
  39. {\plain {\fs28 \ul \b SEXAGESIMAL ANGLE/TIME
  40.  CONVERSIONS}}
  41. }
  42. .TXT 3 0 2 0
  43. Cg a71.375000,71.000000,1085
  44. {\rtf1\ansi \deff0
  45. {\fonttbl
  46. {\f0\fnil Arial;}
  47. }
  48. {\plain {Since Mathcad functions expect 
  49. all angular arguments in radians it is easiest
  50.  to supply all\par angular arguments in 
  51. radians and create a few functions for converting
  52.  between "radians" and\par "sexagesimal"
  53.  units (degrees, minutes, seconds(DMS)).
  54.  Below is my attempt at these conversions.
  55.  }{\b rtdms}{ is the inverse function of
  56.  }{\b dmstr}{. There is no inverse function
  57.  for }{\b rtdmsv}{, it is mainly for creating
  58.  more readable output. }{Because these functions
  59.  use global definitions they \par can be
  60.  pasted anywhere in your Mathcad document
  61.  (e.g. at the end) and still be accessible
  62.  to \par all equations in your document.
  63.  Care must be used when adding angular values.
  64.  If angles have been converted to DMS format
  65.  they must be converted back to radians 
  66. before they can be added. It would be very
  67.  easy to create a function to add angles
  68.  in the DMS format but all that I want \par 
  69. these functions to do is convert my DMS 
  70. data to radians so that Mathcad can work
  71.  with it and then convert the results that
  72.  I get from Mathcad back to DMS. These functions
  73.  will handle negative input values. \par 
  74. }}
  75. }
  76. .TXT 28 -2 3 0
  77. Cg a48.250000,73.000000,129
  78. {\rtf1\ansi \deff0
  79. {\fonttbl
  80. {\f0\fnil Arial;}
  81. }
  82. {\plain {\ul \b rt}{\ul \b dms(radians)}{
  83.  - }{\ul \b R}{ADIANS }{\ul \b T}{O }{\ul 
  84. \b D}{EGREES, }{\ul \b M}{INUTES, }{\ul 
  85. \b S}{ECONDS}}
  86. }
  87. .TXT 3 0 4 0
  88. Cg a68.125000,73.000000,152
  89. {\rtf1\ansi \deff0
  90. {\fonttbl
  91. {\f0\fnil Arial;}
  92. }
  93. {\plain {\ul \b rtdmsv(radians)}{ - }{\b 
  94. \ul R}{ADIANS }{\ul \b T}{O }{\ul \b D}{EGREES,
  95.  }{\ul \b M}{INUTES, }{\ul \b S}{ECONDS 
  96. WITH }{\ul \b V}{ECTOR OUTPUT }}
  97. }
  98. .TXT 4 0 5 0
  99. Cg a72.625000,73.000000,766
  100. {\rtf1\ansi \deff0
  101. {\fonttbl
  102. {\f0\fnil Arial;}
  103. }
  104. {\plain {\ul \b rtdms}{\ulnone \b0  - The
  105.  output of this function is a scalar, e.g.,
  106.  0.5 rad will convert to "28.385240". (28
  107.  deg 38\par min 52.40 sec). The minutes 
  108. and seconds value may be rounded if the 
  109. "Displayed Precision" is set\par to a value
  110.  less than 4 (see NUMERICAL FORMAT,}{\b0 
  111. \ulnone  ALT+M, F}{\b0 \ulnone ).\par \par 
  112. }{\ul \b rtdmsv}{\b0 \ulnone  - The output
  113.  of this function is a vector (actually 
  114. it is a 1 X 3 matrix), e.g., 0.5 rad will
  115.  convert to "( 28  38  52.40)". }{\b0 \ulnone 
  116. The value of "nod" (see below) determines
  117.  the }{\ul \b0 n}{\b0 \ulnone umber }{\ul 
  118. \b0 o}{\b0 \ulnone f }{\ul \b0 d}{\b0 \ulnone 
  119. ecimals in the seconds value. Unwanted trailing
  120.  zeroes in the decimals of seconds value
  121.  can be removed using the NUMERICAL FORMAT
  122.  settings }{\b0 \ulnone ( ALT+M, F)}{\b0 
  123. \ulnone .  }}
  124. }
  125. .TXT 20 0 6 0
  126. Cg a19.750000,73.000000,60
  127. {\rtf1\ansi \deff0
  128. {\fonttbl
  129. {\f0\fnil Arial;}
  130. }
  131. {\plain {\ul \b r}{adians }{\ul \b t}{o 
  132. decimal }{\ul \b d}{egrees}}
  133. }
  134. .TXT 0 23 7 0
  135. Cg a19.750000,43.000000,73
  136. {\rtf1\ansi \deff0
  137. {\fonttbl
  138. {\f0\fnil Arial;}
  139. }
  140. {\plain {\ulnone \b0 d}{ecimal }{\ul \b 
  141. d}{egrees }{\ul \b t}{o }{\ul \b r}{adians}}
  142. }
  143. .EQN 4 -23 8 0
  144. {0:rtd}NAME~(180)/({0:\p}NAME)
  145. .EQN 0 23 9 0
  146. {0:dtr}NAME~({0:\p}NAME)/(180)
  147. .EQN 0 25 42 0
  148. {0:chop}NAME({0:r}NAME)~{0:if}NAME({0:r}NAME<0,{0:ceil}NAME({0:r}NAME),{0:floor}NAME({0:r}NAME))
  149. .TXT 2 0 44 0
  150. Cg a25.000000,36.625000,69
  151. {\rtf1\ansi \deff0
  152. {\fonttbl
  153. {\f0\fnil Arial;}
  154. }
  155. {\plain {\fs16 The chop function handles
  156.  the truncation\par of negative angles.}}
  157. }
  158. .EQN 3 -48 45 0
  159. {0:r_d}NAME({0:r}NAME)~{0:chop}NAME({0:r}NAME*{0:rtd}NAME)
  160. .EQN 3 0 46 0
  161. {0:r_m}NAME({0:r}NAME)~{0:chop}NAME(({0:r}NAME*{0:rtd}NAME-{0:r_d}NAME({0:r}NAME))*60)
  162. .EQN 2 36 48 0
  163. {0:nod}NAME~3
  164. .TXT 0 7 14 0
  165. Cg a37.000000,37.000000,264
  166. {\rtf1\ansi \deff0
  167. {\fonttbl
  168. {\f0\fnil Arial;}
  169. }
  170. {\plain {<<   }{\fs16 \ul \b n}{\fs16 umber
  171.  }{\fs16 \ul \b o}{\fs16 f }{\fs16 \ul \b 
  172. d}{\fs16 ecimals  - increase this value 
  173. to get more                decimals in the
  174.  seconds value or set it to zero for no 
  175.                  decimal places (for }{\fs16 
  176. \b rtdmsv}{\fs16  only).}}
  177. }
  178. .EQN 1 -43 47 0
  179. {0:r_s}NAME({0:r}NAME)~(({0:r}NAME*{0:rtd}NAME-{0:r_d}NAME({0:r}NAME))*60-{0:r_m}NAME({0:r}NAME))*60
  180. .EQN 5 0 49 0
  181. {0:r_sd}NAME({0:r}NAME)~{0:r_s}NAME({0:r}NAME)-(({0:r_s}NAME({0:r}NAME)*(10)^({0:nod}NAME)-{0:chop}NAME({0:r_s}NAME({0:r}NAME)*(10)^({0:nod}NAME)))/((10)^({0:nod}NAME)))
  182. .EQN 6 0 50 0
  183. {0:rtdms}NAME({0:r}NAME)~{0:r_d}NAME({0:r}NAME)+({0:r_m}NAME({0:r}NAME))/(100)+({0:r_s}NAME({0:r}NAME))/(10000)
  184. .EQN 0 26 51 0
  185. {0:rtdmsv}NAME({0:r}NAME)~({1,3}÷{0:if}NAME({0:r_sd}NAME({0:r}NAME)<0,-{0:r_sd}NAME({0:r}NAME),{0:r_sd}NAME({0:r}NAME))÷{0:if}NAME({0:r_m}NAME({0:r}NAME)<0,-{0:r_m}NAME({0:r}NAME),{0:r_m}NAME({0:r}NAME))÷{0:r_d}NAME({0:r}NAME))
  186. .TXT 5 -26 18 0
  187. Cg a21.875000,73.000000,38
  188. {\rtf1\ansi \deff0
  189. {\fonttbl
  190. {\f0\fnil Arial;}
  191. }
  192. {\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
  193. }
  194. .TXT 0 26 19 0
  195. Cg a42.500000,43.000000,71
  196. {\rtf1\ansi \deff0
  197. {\fonttbl
  198. {\f0\fnil Arial;}
  199. }
  200. {\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
  201. }
  202. .TXT 3 -25 20 0
  203. Cg a52.750000,72.000000,121
  204. {\rtf1\ansi \deff0
  205. {\fonttbl
  206. {\f0\fnil Arial;}
  207. }
  208. {\plain {\ul \b EXAMPLE}{\ul \b :       
  209.                                         
  210.                                         
  211.  }{\b  }}
  212. }
  213. .EQN 3 1 21 0
  214. {0:\b}NAME:{0}0.5
  215. .TXT 0 6 22 0
  216. Cg a5.250000,65.000000,10
  217. {\rtf1\ansi \deff0
  218. {\fonttbl
  219. {\f0\fnil Arial;}
  220. }
  221. {\plain {radians}}
  222. }
  223. .EQN 3 -6 23 0
  224. {0:rtdms}NAME({0:\b}NAME)={84534}?_n_u_l_l_
  225. .TXT 0 20 24 0
  226. Cg a2.375000,51.000000,8
  227. {\rtf1\ansi \deff0
  228. {\fonttbl
  229. {\f0\fnil Arial;}
  230. }
  231. {\plain {\b OR}}
  232. }
  233. .EQN 0 8 25 0
  234. {0:rtdmsv}NAME({0:\b}NAME)={0}?_n_u_l_l_
  235. .TXT 4 -28 26 0
  236. Cg a53.000000,71.000000,244
  237. {\rtf1\ansi \deff0
  238. {\fonttbl
  239. {\f0\fnil Arial;}
  240. }
  241. {\plain {The main difference between }{\b 
  242. rtdms}{ and }{\b rtdmsv}{ is that the vector
  243.  output\par of }{\b rtdmsv}{ is a little
  244.  easier to read.\par }{\ul              
  245.                                         
  246.                                         
  247.           }}
  248. }
  249. .TXT 7 -2 56 0
  250. C x1,1,0,0
  251. .TXT 5 0 28 0
  252. Cg a54.000000,72.000000,125
  253. {\rtf1\ansi \deff0
  254. {\fonttbl
  255. {\f0\fnil Arial;}
  256. }
  257. {\plain {\ul \b dmstr(DDD.MMSSsss)}{ - }{\ul 
  258. \b D}{EGREES, }{\ul \b M}{INUTES, }{\ul 
  259. \b S}{ECONDS, }{\ul \b T}{O }{\ul \b R}{ADIANS}}
  260. }
  261. .TXT 3 3 29 0
  262. Cg a67.500000,69.000000,456
  263. {\rtf1\ansi \deff0
  264. {\fonttbl
  265. {\f0\fnil Arial;}
  266. }
  267. {\plain {The following functions will convert
  268.  an angle in degrees, minutes, seconds format
  269.  to radians.\par The format for the input
  270.  angle is DDD.MMSSsss, e.g., }{\ul 118}{\ulnone 
  271. \up6 deg}{\ul  42}{\ulnone \up6 min}{\ul 
  272.  09.2211}{\ulnone \up6 sec}{ would be \par 
  273. input as }{\ul 118.42092211}{. The value
  274.  for seconds can include any number of decimal
  275.  places.\par The number of decimal places
  276.  in the radian output value is controlled
  277.  by the NUMERICAL \par FORMAT settings (
  278.  ALT+M, F). }}
  279. }
  280. .EQN 14 -1 52 0
  281. {0:d_d}NAME({0:d}NAME)~{0:chop}NAME({0:d}NAME)
  282. .EQN 3 0 53 0
  283. {0:d_m}NAME({0:d}NAME)~{0:chop}NAME(({0:d}NAME-{0:d_d}NAME({0:d}NAME))*100)
  284. .EQN 3 0 54 0
  285. {0:d_s}NAME({0:d}NAME)~((({0:d}NAME-{0:d_d}NAME({0:d}NAME))*100)-{0:d_m}NAME({0:d}NAME))*100
  286. .EQN 4 0 55 0
  287. {0:dmstr}NAME({0:d}NAME)~({0:d_d}NAME({0:d}NAME)*3600+{0:d_m}NAME({0:d}NAME)*60+{0:d_s}NAME({0:d}NAME))/(206264.806247)
  288. .TXT 4 0 34 0
  289. Cg a29.375000,72.000000,50
  290. {\rtf1\ansi \deff0
  291. {\fonttbl
  292. {\f0\fnil Arial;}
  293. }
  294. {\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
  295. }
  296. .TXT 6 0 35 0
  297. Cg a52.750000,72.000000,121
  298. {\rtf1\ansi \deff0
  299. {\fonttbl
  300. {\f0\fnil Arial;}
  301. }
  302. {\plain {\ul \b EXAMPLE}{\ul \b :       
  303.                                         
  304.                                         
  305.  }{\b  }}
  306. }
  307. .EQN 4 0 36 0
  308. {0:\a}NAME:{0}28.3852403123
  309. .TXT 0 16 37 0
  310. Cg a22.375000,56.000000,59
  311. {\rtf1\ansi \deff0
  312. {\fonttbl
  313. {\f0\fnil Arial;}
  314. }
  315. {\plain {(28 }{\up6 deg}{ 38 }{\up6 min}{
  316.  52.403123 }{\up6 sec}{)}}
  317. }
  318. .EQN 4 -16 38 0
  319. {0:dmstr}NAME({0:\a}NAME)={18995}?_n_u_l_l_
  320. .TXT 3 0 39 0
  321. Cg a52.500000,72.000000,112
  322. {\rtf1\ansi \deff0
  323. {\fonttbl
  324. {\f0\fnil Arial;}
  325. }
  326. {\plain {\ul                            
  327.                                         
  328.                                       }}
  329. }
  330. .TXT 4 0 40 0
  331. Cg a8.625000,72.000000,15
  332. {\rtf1\ansi \deff0
  333. {\fonttbl
  334. {\f0\fnil Arial;}
  335. }
  336. {\plain {End Of File.}}
  337. }
  338.